using System;
using System.Collections.Generic;
using System.Text;

namespace zeroflag.Parserz
{
	public class String : Token
	{
		public new Character Inner
		{
			get
			{
				return base.Inner as Character;
			}
			set
			{
				base.Inner = value;
			}
		}

		public string Value
		{
			get
			{
				if (this.Inner != null)
					return this.Inner.ToString(new StringBuilder()).ToString();
				else
					return "";
			}
			set
			{
				this.Inner = new Character();
				Character current = this.Inner;
				if (value != null)
				{
					foreach (char c in value)
					{
						current.Value = c;
						current.Add(current = new Character());
					}
					current.Clear();
				}
			}
		}

		public override string ToString()
		{
			return this.Value;
		}
	}
}
